import React, { Component } from "react";
import { Button } from "antd";
import "./App.less";
import Modal from "c/modal";

class App extends Component {
  state = {
    visible: false
  };

  openVisible = () => {
    this.setState({
      visible: true
    });
  };

  closeVisible = () => {
    this.setState({
      visible: false
    });
  };

  onConfirm = () => {};

  render() {
    return (
      <div>
        <div>
          <Button type="primary" onClick={this.openVisible}>
            打开
          </Button>
        </div>
        <Modal
          title="你好"
          visible={this.state.visible}
          okText="确定"
          cancelText="取消"
          onOk={this.onConfirm}
          onCancel={this.closeVisible}
          style={{
            width: "600px",
            height: "400px"
          }}
        >
          123
        </Modal>
      </div>
    );
  }
}

export default App;
